
package Presentation;

import javax.swing.JOptionPane;
import DTO.Function;

public class Main extends javax.swing.JFrame {
    public Main() {
        initComponents();
    }
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        btnKetquaXH = new javax.swing.JButton();
        btnCauthu = new javax.swing.JButton();
        btnTrongtaiHLV = new javax.swing.JButton();
        btnLichthidau = new javax.swing.JButton();
        btnDoibong = new javax.swing.JButton();
        btnThaydoiQD = new javax.swing.JButton();
        btnTraCuu = new javax.swing.JButton();
        btnbxh = new javax.swing.JButton();
        panelChinh = new javax.swing.JDesktopPane();
        jPanel2 = new javax.swing.JPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Chương trình quản lý giải bóng đá vô địch quốc gia");
        setMaximumSize(new java.awt.Dimension(1024, 700));
        setMinimumSize(new java.awt.Dimension(1024, 700));
        setPreferredSize(new java.awt.Dimension(1100, 700));
        setResizable(false);

        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel1.setPreferredSize(new java.awt.Dimension(200, 400));

        btnKetquaXH.setText("Kết quả - Xếp hạng");
        btnKetquaXH.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnKetquaXHActionPerformed(evt);
            }
        });

        btnCauthu.setText("Quản lý cầu thủ");
        btnCauthu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCauthuActionPerformed(evt);
            }
        });

        btnTrongtaiHLV.setText("Quản lý trọng tài - HLV");
        btnTrongtaiHLV.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTrongtaiHLVActionPerformed(evt);
            }
        });

        btnLichthidau.setText("Quản lý lịch thi đấu");
        btnLichthidau.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLichthidauActionPerformed(evt);
            }
        });

        btnDoibong.setText("Quản lý đội bóng");
        btnDoibong.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDoibongActionPerformed(evt);
            }
        });

        btnThaydoiQD.setText("Thay đổi quy định");
        btnThaydoiQD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThaydoiQDActionPerformed(evt);
            }
        });

        btnTraCuu.setText("Tra Cứu");
        btnTraCuu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTraCuuActionPerformed(evt);
            }
        });

        btnbxh.setText("Bảng xếp hạng");
        btnbxh.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnbxhActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(24, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(btnbxh, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnTraCuu, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(btnThaydoiQD, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(btnKetquaXH, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(btnLichthidau, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(btnTrongtaiHLV, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(btnCauthu, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(btnDoibong, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE))
                .addGap(20, 20, 20))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnDoibong, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnCauthu, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnTrongtaiHLV, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnLichthidau, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnKetquaXH, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnbxh, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnTraCuu, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnThaydoiQD, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(227, Short.MAX_VALUE))
        );

        panelChinh.setMaximumSize(new java.awt.Dimension(700, 300));
        panelChinh.setMinimumSize(new java.awt.Dimension(700, 300));

        jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 126, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(panelChinh, javax.swing.GroupLayout.DEFAULT_SIZE, 970, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(45, 45, 45))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 598, Short.MAX_VALUE)
                    .addComponent(panelChinh, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnTrongtaiHLVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTrongtaiHLVActionPerformed
        QLTT_HLV tt = new QLTT_HLV();
        tt.setBounds(0,0,869,533);
        panelChinh.removeAll();
        panelChinh.add(tt);
    }//GEN-LAST:event_btnTrongtaiHLVActionPerformed

    private void btnDoibongActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDoibongActionPerformed
            QLDB db= new QLDB();
            db.setBounds(0, 0, 869, 533);
            panelChinh.removeAll();
            panelChinh.add(db);
    }//GEN-LAST:event_btnDoibongActionPerformed

    private void btnThaydoiQDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThaydoiQDActionPerformed
        ThaydoiQuydinh qd= new ThaydoiQuydinh();    
          qd.setBounds(0, 0, 869, 533);
            panelChinh.removeAll();
            panelChinh.add(qd);
    }//GEN-LAST:event_btnThaydoiQDActionPerformed

    private void btnCauthuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCauthuActionPerformed
        QuanlyCauthu ct = new QuanlyCauthu();
        ct.setBounds(0,0,869,533);
        panelChinh.removeAll();
        panelChinh.add(ct);
    }//GEN-LAST:event_btnCauthuActionPerformed

    private void btnTraCuuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTraCuuActionPerformed
        TraCuu tc = new TraCuu();
        tc.setBounds(0, 0, 869, 533);
        panelChinh.removeAll();;
        panelChinh.add(tc);
    }//GEN-LAST:event_btnTraCuuActionPerformed

    private void btnKetquaXHActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnKetquaXHActionPerformed
        KetquaXephang kq= new KetquaXephang();
        kq.setBounds(0, 0, 869, 533);
        panelChinh.removeAll();;
        panelChinh.add(kq);
        // TODO add your handling code here:
    }//GEN-LAST:event_btnKetquaXHActionPerformed

    private void btnLichthidauActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLichthidauActionPerformed
        LichThiDau l= new LichThiDau();
         l.setBounds(0, 0, 869, 533);
        panelChinh.removeAll();
        panelChinh.add(l);
        
        // TODO add your handling code here:
    }//GEN-LAST:event_btnLichthidauActionPerformed

    private void btnbxhActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnbxhActionPerformed
        // TODO add your handling code here:
        BXH bxh = new  BXH();
        bxh.setBounds(0,0,869,533);
        panelChinh.removeAll();
        panelChinh.add(bxh);
                
    }//GEN-LAST:event_btnbxhActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                
                new Main().setVisible(true);
            }
        });
    }


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCauthu;
    private javax.swing.JButton btnDoibong;
    private javax.swing.JButton btnKetquaXH;
    private javax.swing.JButton btnLichthidau;
    private javax.swing.JButton btnThaydoiQD;
    private javax.swing.JButton btnTraCuu;
    private javax.swing.JButton btnTrongtaiHLV;
    private javax.swing.JButton btnbxh;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    public javax.swing.JDesktopPane panelChinh;
    // End of variables declaration//GEN-END:variables
}
